<?php

class plus_controller extends controller
{

    public $current ="index";

    public function count(){
        $yuming_id = $this->yuming_website['id'];
        $aid = gp('aid');
        $count = db::getfield("select click from `content_{$yuming_id}` where id='$aid' ");
        echo 'document.write('.$count.');';
	}

    public function search(){
    	spider::write($GLOBALS['W']['id']);
    	
		$yuming_id = $this->yuming_website['id'];
		$typeid = 'search';
		$typename = "搜索";

		$showtypes = array('new'=>'最新', 'hot'=>'热点', 'photo'=>'图文');
		$showtype = 'new';

		$url = $this->rest_uri;
		$x=4;
		$keyword = trim(gp("keyword"));
		$q = trim(gp("q"));

		if (empty($keyword) && !empty($q)) {
			$keyword = $q;
		}

		$title = "搜索结果";
		$pagetitle = $title .'-'. $this->yuming_website['sitename'];
		$keywords = $this->yuming_website['keywords'];
		$description = $this->yuming_website['description'];

		require $this->tpl('search');
	}


}

